//
//  BNRItem.h
//  Quiz
//
//  Created by YaoJacob on 15/11/1.
//  Copyright © 2015年 Roger. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface BNRItem : NSObject <NSCoding>
//{
//    NSString *_itemName;  //default == protected.
//    NSString *_serialNumber;
//    int _valueInDollars;
//    NSDate * _dateCreated;
//    
//    BNRItem* _containedItem;
//    BNRItem* _container;
//}

+(instancetype)randomItem;

-(instancetype)initWithItemName:(NSString*)name valueInDollars:(int)value serialNumber:(NSString*) sNumber;
-(instancetype)initWithItemName:(NSString*)name;
-(instancetype)initWithItemName:(NSString*)name serialNumber:(NSString*) sNumber;

//未来直接用@property即可。
//-(void)setItemName:(NSString*)str;
//-(NSString*)itemName;
//
//-(void)setSerialNumber:(NSString*)str;
//-(NSString*)serialNumber;
//
//-(void)setValueInDollars:(int)v;
//-(int)valueInDollars;
//
//-(void)setContainedItem:(BNRItem*)str;
//-(BNRItem*)containedItem;
//
//-(void)setContainer:(BNRItem*)str;
//-(BNRItem*)container;
//
//-(NSDate*)dateCreated;

//@property (nonatomic, strong) BNRItem * containedItem;
//@property (nonatomic, weak) BNRItem * container;
@property (nonatomic, copy) NSString *itemName;
@property (nonatomic, copy) NSString *serialNumber;
@property (nonatomic) int valueInDollars;
@property (nonatomic,readonly) NSDate * dateCreated;
@property (nonatomic, copy) NSString *itemKey;

@end
